#ifndef MPU6050_TASK_H
#define MPU6050_TASK_H

#include "struct_typedef.h"
#include "bsp_mpu6050.h"

#define PI 3.141592653f
#define ALPHA 0.98    //互补滤波系数
#define DT   0.01     //采样周期
#ifdef __cplusplus
extern "C"{
#endif

#ifdef __cplusplus

class mpu6050_t
{
    public:
        fp32 accel_x;
        fp32 accel_y;
        fp32 accel_z;
        fp32 gyro_x;
        fp32 gyro_y;
        fp32 gyro_z;
        fp32 temp;

        fp32 pitch;
        fp32 roll;
        fp32 accel_pitch;
        fp32 accel_roll;
        
        void GetInfo();
        void Calc();
};



#endif

extern void mpu6050_task(void const *pvParameters);

#ifdef __cplusplus
}
#endif



#endif

